import request from '@/utils/request';

// 查询网端总览路径图
export function queryOverviewRoad(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/overview/queryOverviewRoad',
		method: 'post',
		data: data,
	});
}

// 修改网端坐标
export function updateSegmentPosition(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/overview/updateSegmentPosition',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询网端指标趋势
export function queryIndicatorTrend(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/overview/queryIndicatorTrend',
		method: 'post',
		data: data,
	});
}

// 查询返回码统计信息
export function queryRetStatisInfo(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/overview/queryRetStatisInfo',
		method: 'post',
		data: data,
	});
}

// 分页查询失败请求量详情列表
export function queryFailReqListPage(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/overview/queryFailReqListPage',
		method: 'post',
		data: data,
	});
}

// 失败请求量详情下载
export function downloadFailReqList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/overview/downloadFailReqList',
		method: 'post',
		data: data,
		responseType: 'blob',
	});
}

// 查询告警类型统计信息
export function queryAlarmTypeStatisInfo(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/overview/queryAlarmTypeStatisInfo',
		method: 'post',
		data: data,
	});
}

// 分页查询告警请求量详情列表
export function queryAlarmReqListPage(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/overview/queryAlarmReqListPage',
		method: 'post',
		data: data,
	});
}

// 告警请求量详情下载
export function downloadAlarmReqList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/overview/downloadAlarmReqList',
		method: 'post',
		data: data,
		responseType: 'blob',
	});
}

// 分页查询网端数据总览
export function querySegmentDataOverview(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/overview/querySegmentDataOverview',
		method: 'post',
		data: data,
	});
}

// 查询网端告警类型占比
export function querySegmentAlarmProportion(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/querySegmentAlarmProportion',
		method: 'post',
		params: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 下载网端总览列表数据
export function exportSegmentList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/segment/overview/querySegmentDataOverviewExport',
		method: 'post',
		data: data,
		responseType: 'blob',
	});
}
